package com.shg.bean;

import java.io.Serializable;
import java.util.Set;

public class Power implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	//id
	private long id;
	//权限的名称
	private String name;
	//操作路径
	private String url;
	//状态0:锁定 1：活动
	private Integer state=1;
	//备注
	private String remarks;
	//权限所属角色
	private Set<Roles> role;
	//父目录
	private long parent;
	//伪类属性check=true标识选中  否则为没有选择
	private boolean check=false;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public Set<Roles> getRole() {
		return role;
	}
	public void setRole(Set<Roles> role) {
		this.role = role;
	}
	public boolean isCheck() {
		return check;
	}
	public void setCheck(boolean check) {
		this.check = check;
	}
	public long getParent() {
		return parent;
	}
	public void setParent(long parent) {
		this.parent = parent;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Power other = (Power) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
}
